package com.chris.emailservice.controller;

import com.chris.emailservice.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MailController {

    @Autowired
    private MailService mailService;

    @GetMapping("/send")
    public String sendMail() {
        mailService.sendSimpleMail("1195962388@qq.com", "测试主题", "这是测试内容");
        return "邮件已发送";
    }

}
